package com.mpsc.api.bean;

import com.mpsc.api.annotation.ESAnnotation;
import com.mpsc.api.annotation.ESField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章实体类，用于测试es注解使用
 */
@Data
@ESAnnotation(index = "article", type = "article")
public class ArticleEntity implements Serializable {

    @ESField(type = "keyword", name = "id")
    private String id;

    @ESField(name = "articleName", index = "analyzed")
    private String articleName;

    @ESField(type = "keyword", name = "author")
    private String author;

    @ESField(name = "remark", index = "analyzed")
    private String remark;

    @ESField(type = "date", name = "createTime", format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
